<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="./layui/css/layui.css">
</head>
<body>
    <h1>服务器1</h1>
    <button type="button" id="ajaxBtn">ajax请求</button>
    <!-- <script>
        function callback(res){
            console.log(res);
        }
    </script>
    <script src="http://localhost:3001/users"></script> -->
    <script src="./layui/layui.js"></script>
    <script>
        layui.define(function(){
            let {$} = layui;
            $("#ajaxBtn").click(function(){
                $.ajax({
                    type:"get",
                    url:"/api/users",
                    // dataType:"jsonp",
                    // jsonpCallback:"callback",
                    success(res){
                        console.log(res);
                    }
                });
            })
        })
    </script>
</body>
</html>